/*
 * An XML document type.
 * Localname: CelsiusToFahrenheit
 * Namespace: http://tempuri.org/
 * Java type: org.tempuri.CelsiusToFahrenheitDocument
 *
 * Automatically generated - do not modify.
 */
package org.tempuri.impl;
/**
 * A document containing one CelsiusToFahrenheit(@http://tempuri.org/) element.
 *
 * This is a complex type.
 */
public class CelsiusToFahrenheitDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.tempuri.CelsiusToFahrenheitDocument
{
    
    public CelsiusToFahrenheitDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CELSIUSTOFAHRENHEIT$0 = 
        new javax.xml.namespace.QName("http://tempuri.org/", "CelsiusToFahrenheit");
    
    
    /**
     * Gets the "CelsiusToFahrenheit" element
     */
    public org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit getCelsiusToFahrenheit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit target = null;
            target = (org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit)get_store().find_element_user(CELSIUSTOFAHRENHEIT$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "CelsiusToFahrenheit" element
     */
    public void setCelsiusToFahrenheit(org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit celsiusToFahrenheit)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit target = null;
            target = (org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit)get_store().find_element_user(CELSIUSTOFAHRENHEIT$0, 0);
            if (target == null)
            {
                target = (org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit)get_store().add_element_user(CELSIUSTOFAHRENHEIT$0);
            }
            target.set(celsiusToFahrenheit);
        }
    }
    
    /**
     * Appends and returns a new empty "CelsiusToFahrenheit" element
     */
    public org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit addNewCelsiusToFahrenheit()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit target = null;
            target = (org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit)get_store().add_element_user(CELSIUSTOFAHRENHEIT$0);
            return target;
        }
    }
    /**
     * An XML CelsiusToFahrenheit(@http://tempuri.org/).
     *
     * This is a complex type.
     */
    public static class CelsiusToFahrenheitImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.tempuri.CelsiusToFahrenheitDocument.CelsiusToFahrenheit
    {
        
        public CelsiusToFahrenheitImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CELSIUS$0 = 
            new javax.xml.namespace.QName("http://tempuri.org/", "Celsius");
        
        
        /**
         * Gets the "Celsius" element
         */
        public java.lang.String getCelsius()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CELSIUS$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Celsius" element
         */
        public org.apache.xmlbeans.XmlString xgetCelsius()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CELSIUS$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "Celsius" element
         */
        public boolean isSetCelsius()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(CELSIUS$0) != 0;
            }
        }
        
        /**
         * Sets the "Celsius" element
         */
        public void setCelsius(java.lang.String celsius)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CELSIUS$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CELSIUS$0);
                }
                target.setStringValue(celsius);
            }
        }
        
        /**
         * Sets (as xml) the "Celsius" element
         */
        public void xsetCelsius(org.apache.xmlbeans.XmlString celsius)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CELSIUS$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CELSIUS$0);
                }
                target.set(celsius);
            }
        }
        
        /**
         * Unsets the "Celsius" element
         */
        public void unsetCelsius()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(CELSIUS$0, 0);
            }
        }
    }
}
